package com.aifund.common.entity;

import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * 邀请收益记录
 */
@Entity
@SQLDelete(sql = "update invitation_income set delete = 1 where id = ?")
@Where(clause = "is_del = 0")
@Data
@EntityListeners(AuditingEntityListener.class)
public class InvitationIncome {

    @Id
    @GeneratedValue
    private Long id;

    private Long userId;

    //收益类型
    private Integer type;


    private BigDecimal usdtNum;


}
